using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common
{
    /// <summary>
    /// Identifies the message type defined within the Service Provider Register.
    /// </summary>
    public enum MessageTypes
    {
        PatientReferral = 1,
        LaboratoryOrderData = 2,
        LaboratoryOrderResult = 3,
        ClinicalDecisionSupportResult = 4,
        PharmacyDispensingStatus = 5,
        DischargeSummary = 6,
        PatientRecordRequest = 7,
        PatientRecordSummary = 8,
        ServiceProviderListRequest = 1000,
        ServiceProviderListResult = 1001,
        HSDReferenceDataRequest = 1002,
        HSDReferenceDataResult = 1003,
        HealthcareUserIdentifierRequest = 1004,
        HealthcareUserIdentifierResult = 1005,
        ServiceProviderDelete = 1006,
        ServiceProviderUnlock = 1007,
        ServiceProviderLock = 1008,
        ServiceProviderUpdate = 1009,
        ServiceProviderInsert = 1010,
        ServiceProviderInsertResult = 1011,
        ServiceProviderUpdateResult = 1012,
        ServiceProviderLockResult = 1013,
        ServiceProviderSearchRequest = 1014,
        ServiceProviderSearchResult = 1015,
        ServiceProviderSelectRequest = 1070,
        ServiceProviderSelectResult = 1071,
        
        PoolDelete = 1016,
        PoolCheckIn = 1017,
        PoolCheckOut = 1018,
        PoolUpdate = 1019,
        PoolInsert = 1020,
        PoolInsertResult = 1021,
        PoolUpdateResult = 1022,
        PoolCheckOutResult = 1023,
        PoolSearchRequest = 1024,
        PoolSearchResult = 1025,
        
        PoolServiceProviderTypeDelete = 1028,
        PoolServiceProviderTypeInsert = 1029,

        ServiceProviderPoolDelete = 1026,
        ServiceProviderPoolInsert = 1027,
        
        ServiceProviderTypeDelete = 1030,
        ServiceProviderTypeCheckIn = 1031,
        ServiceProviderTypeCheckOut = 1032,
        ServiceProviderTypeUpdate = 1033,
        ServiceProviderTypeInsert = 1034,
        ServiceProviderTypeInsertResult = 1035,
        ServiceProviderTypeUpdateResult = 1036,
        ServiceProviderTypeCheckOutResult = 1037,
        PoolCheckInAll = 1038,
        ServiceProviderTypeCheckInAll = 1039,
        ServiceProviderUnlockAll = 1040,
        ServiceProviderTypeSearchRequest = 1041,
        ServiceProviderTypeSearchResult = 1042,

        ServiceProviderTypeSelectRequest = 1064,
        ServiceProviderTypeSelectResult = 1065,

        MessageTypeSearchRequest = 1043, 
        MessageTypeSearchResult = 1044,
        MessageTypeCheckIn = 1045,
        MessageTypeCheckOut = 1046,
        MessageTypeCheckOutResult = 1047,
        MessageTypeCheckinAll = 1048,
        MessageTypeInsert = 1049,
        MessageTypeInsertResult = 1050,
        MessageTypeUpdate = 1051,
        MessageTypeUpdateResult = 1052,
        MessageTypeDelete = 1053,            
    
        MessageTypeServiceProviderTypesAdd= 1054,
        MessageTypeServiceProviderTypesDelete = 1055,
        MessageTypeSelectItemRequest = 1056,
        MessageTypeSelectItemResult = 1057,
        ServiceProviderTypeMessageTypesInsert = 1058,
        
        ServiceProviderTypeMessageTypeSearchRequest = 1059,
        ServiceProviderTypeMessageTypeSearchResult = 1060,
        
        PoolServiceProviderTypeSearchRequest = 1061,
        PoolServiceProviderTypeSearchResult = 1062,
        PoolServiceProviderTypesInsert = 1063,

        PoolSelectItemRequest = 1066,
        PoolSelectItemResult = 1067,

        PoolServiceProviderTypesDelete = 1068,
        MessageTypeServiceProviderTypesListDelete = 1069,

        ServiceProviderPoolsDelete = 9003,
        ServiceProviderPoolsInsert = 9004,

        IRRequest = 1200,
        IRResult = 1201,        

        ValidateUser = 2000,
        PrincipalResult = 2001,

        PatientRegisterInsert = 9005,
        PatientRegisterUpdate = 9006,
        PatientRegisterSearch = 9007,
        PatientRegisterSearchResult = 9008,
        PatientRegisterSelect = 9009,
        PatientRegisterSelectResult = 9010,
        PatientRegisterLock = 9011,
        PatientRegisterUnLock = 9012,
        PatientRegisterUnlockAll = 9013,
        PatientRegisterUpdateResult = 9014,
        PatientRegisterInsertResult = 9015
    }

    [Obsolete("Should be using \"Microsoft.ConnectionEngine.Common.SystemAdapterExceptionCause\" instead")]
    public enum PnPMessageStatusValues
    {
        Ok = 0,
        PnPMessageFormatInvalid = 1,
        PnPMessageContentInvalid = 2,
        ServiceProvidersDifferentPools = 3,
        MessageTypeInvalidForServiceProviders = 4,
        PayloadFormatInvalid = 5,
        PayloadContentInvalid = 6,
        PayloadDecryptError = 7,
        PayloadEncryptError = 8,
        RecordCheckedout = 10,
        SecurityError = 11,
        UnhandledError = 99
    }
    
}
